#ifndef _BULLET_H_
#define _BULLET_H_

#include "Goble.h"
#include <ddraw.h>
#include "Image.h"
#include <list>

extern struct MonsterInfo;

struct BulletInfo
{
	POINT viewPoint;
	float life;
	RECT bulletRect;
	MOVEDIRECTION dir;
};

class Bullet
{
private:
	LPDIRECTDRAWSURFACE7 face[2];
	POINT vel;
	int width;
	int height;
	std::list<BulletInfo> mBulletList;
	int world;
	
public:
	Bullet(int vel);

	~Bullet(){}

	void CreateSurface(LPDIRECTDRAW7 lpdd,int width,int height,int frame);

	void LoadImage(Image image,int frame);

	void BltToSurface(LPDIRECTDRAWSURFACE7 lpddback,POINT now,MOVEDIRECTION di);
	
	void addBullet(BulletInfo one);

	void update();

	void draw(LPDIRECTDRAWSURFACE7 lpddback);

	bool checkMonster(RECT mon);

	void setWorld(int now);

	void infoUpdate();

};


#endif